package com.team6.cet.serviceimpl;
import java.util.List;  

import org.springframework.beans.factory.annotation.Autowired;  
import org.springframework.stereotype.Service;  
import org.springframework.transaction.annotation.Transactional;

import com.team6.cet.entity.OrdinaryUser;
import com.team6.cet.mapper.OrdinaryUserMapper;
import com.team6.cet.service.OrdinaryUserService;  
 
  
@Service  
public class OrdinaryUserServiceImpl implements OrdinaryUserService{  
  
    @Autowired  
    private OrdinaryUserMapper userMapper;  
  
    public List<OrdinaryUser> getUserInfo(int page,int pageSize){  
        return userMapper.findordinaryuserInfo( page,pageSize);  
    }  
  
      
    public void insert(OrdinaryUser user) {  
        userMapper.addordinaryuserInfo(user);  
          
    }


	@Override
	public void del(int ExaminationInformationID) {
		// TODO Auto-generated method stub
		userMapper.delordinaryuserInfo(ExaminationInformationID);
	}


	@Override
	public int findUserNum() {
		// TODO Auto-generated method stub
		return userMapper.findordinaryuserNum();
	}


	@Override
	public int updataUserINfo(OrdinaryUser user) {
		// TODO Auto-generated method stub
		return userMapper.updataordinaryuserINfo(user);
	}


	@Override
	public OrdinaryUser getUserInfo(int id) {
		// TODO Auto-generated method stub
		return userMapper.getordinaryuserInfo(id);
	}


	@Override
	public OrdinaryUser FindByEmailandPassword(String email, String password) {
		// TODO Auto-generated method stub
		return userMapper.EmailandPassword(email, password);
	}


	@Override
	public OrdinaryUser getOrdinarybyEmail(String email) {
		// TODO Auto-generated method stub
		return userMapper.getOrdinarybyEmail(email);
	}  
}  
